package com.ihome.android.market2.info;

import com.google.gson.Gson;

public class AccountInfo {
	/** 用户账号 */
	private String	userID;
	/** 昵称 */
	private String	nickName;
	/** 姓名 */
	private String	realName;
	/** 性别：0：男；1：女 */
	private int		sex;
	/** 生日。格式：1980.01.01 */
	private String	birthday;
	/** 邮箱 */
	private String	email;
	/**
	 * 用户账号类型 0：普通用户（需要绑定机顶盒） 1：测试用户(无需绑定机顶盒)
	 */
	private String	userIDType;
	/**
	 * 用户状态 1:正常 2:暂停 3:已注销
	 */
	private String	userState;
	/** 用户属地 */
	private String	areano;
	/** 机顶盒ID */
	private String	stbID;
	/** 用户分组ID */
	private String	groupID;
	/** 行业代码 */
	private String	tradeID;
	/** EPG模板 */
	private String	stbTemplate;
	/** 节点ID */
	private String	nodeID;
	/** iTV账号（应用商城客户端如果发现与机顶盒里面的iTV账号不一致需要用户手工输入应用商城密码重新做一次密码校验，同时更新绑定的iTV账号） */
	private String	iTVAccount;
	/** 手机号码 */
	private String phone;
	/** 支付密码 */
	private String payPassword;

	@Override
	public String toString() {
		return new Gson().toJson(this);
	}

	public static final int	SEX_MAN		= 0;
	public static final int	SEX_WOMAN	= 1;

	public String getUserID() {
		return userID;
	}

	public void setUserID(String userID) {
		this.userID = userID;
	}

	public String getNickname() {
		return nickName;
	}

	public void setNickname(String nickname) {
		this.nickName = nickname;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getUserIDType() {
		return userIDType;
	}

	public void setUserIDType(String userIDType) {
		this.userIDType = userIDType;
	}

	public String getUserState() {
		return userState;
	}

	public void setUserState(String userState) {
		this.userState = userState;
	}

	public String getAreano() {
		return areano;
	}

	public void setAreano(String areano) {
		this.areano = areano;
	}

	public String getStbID() {
		return stbID;
	}

	public void setStbID(String stbID) {
		this.stbID = stbID;
	}

	public String getGroupID() {
		return groupID;
	}

	public void setGroupID(String groupID) {
		this.groupID = groupID;
	}

	public String getTradeID() {
		return tradeID;
	}

	public void setTradeID(String tradeID) {
		this.tradeID = tradeID;
	}

	public String getStbTemplate() {
		return stbTemplate;
	}

	public void setStbTemplate(String stbTemplate) {
		this.stbTemplate = stbTemplate;
	}

	public String getNodeID() {
		return nodeID;
	}

	public void setNodeID(String nodeID) {
		this.nodeID = nodeID;
	}

	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		if (sex == SEX_MAN || sex == SEX_WOMAN) {
			this.sex = sex;
		}
		else {
			this.sex = SEX_MAN;
		}
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	
	public String getiTVAccount() {
		return iTVAccount;
	}

	public void setiTVAccount(String iTVAccount) {
		this.iTVAccount = iTVAccount;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	public String getPayPassword() {
		return payPassword;
	}

	public void setPayPassword(String payPassword) {
		this.payPassword = payPassword;
	}

	public AccountInfo() {}
}
